package com.alstudio.utils.android.net.http.http2;

public class HttpException extends Exception {

	private static final long serialVersionUID = 5777381314307167592L;
	private int statusCode = -1;

	public HttpException(Exception cause) {
		super(cause);
	}

	public HttpException(int statusCode) {
		this("", statusCode);
	}

	public HttpException(String msg, int statusCode) {
		super(msg);
		this.statusCode = statusCode;
	}

	public int getStatusCode() {
		return this.statusCode;
	}

	@Override
	public String toString() {
		return String
				.format("HttpException[%s] : %s", statusCode, getMessage());
	}

}
